feat: Add photo attachments inside equipment and intervention#30
Merged
feat: Add photo attachments inside equipment and intervention#30
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to distinguish between photo and document attachments for both equipment and interventions by introducing a type field to categorize attachments.
- Adds a
typecolumn to attachment tables with check constraints for 'photo' and 'document' values - Updates the attachment component to handle different attachment types with appropriate UI and file filters
- Separates photo and document sections in equipment and intervention detail pages
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
supabase/schemas/intervention_attachments.sql |
Adds type column with check constraint to intervention attachments schema |
supabase/schemas/equipment_attachments.sql |
Adds type column with check constraint to equipment attachments schema |
supabase/migrations/20250801073345_add_type_to_attachment_tables.sql |
Migration script to add type column and constraints to both attachment tables |
src/shared/utils/sanitize-file-name.ts |
New utility function to sanitize file names for storage |
src/shared/components/attachment-list.tsx |
Updates component to handle attachment types with filtered queries and type-specific UI |
src/interventions/pages/show.tsx |
Renders separate photo and document attachment sections |
src/interventions/pages/list.tsx |
Changes sorting from id to date |
src/equipments/pages/show.tsx |
Renders separate photo and document attachment sections |
public/locales/fr.json |
Updates French translations for photo and document sections |
public/locales/en.json |
Updates English translations for photo and document sections |
.github/copilot-instructions.md |
Adds commit message conventions to project guidelines |
08ff944 to
66d2e9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.